#include<bits/stdc++.h>
using namespace std;
int a[100010];
bool sw[100010];
bool cl[100010];

bool cmp(long long a,long long b){
    return a<b;
}


int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    long long n,cnt;
    cin>>n;
    cnt=n;
    for(long long i=1;i<=n;i++)cin>>a[i];
    sort(a+1,a+1+n,cmp);
    for(long long i=1;i<=n;i++){
         if(i==n){
            if(cl[n]!=1&&sw[n]!=1){
                 for(long long j=1;j<n;j++){
                    if(sw[j]!=1&&a[n]>=a[j]){
                        cnt--;
                        break;
                    }
                 }
            }
         }
        else if(cl[i]!=1&&sw[i]!=1&&sw[i+1]!=1){
            if(a[i]>=a[i+1]){
                cl[i]=1;
                sw[i+1]=1;
                cnt--;
            }else{
                cl[i+1]=1;
                sw[i]=1;
                cnt--;
            }
        }


    }
    cout<<cnt;


    return 0;
}
